﻿using System;
using System.Windows;
using System.Windows.Controls;

namespace Project5188.Client
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow
    {
        private static string _demoText;

        public MainWindow(bool isTrial)
        {
            InitializeComponent();

            _demoText = isTrial ? "Project 5188 Demo" : "Project5188";

            Title = _demoText;
        }

        private void BtnParametersClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Parametre Ekranı";
            var contentFrame = (Frame) ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/ParameterPage.xaml", UriKind.Relative);
        }

        private void BtnOperationsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Kurum Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/InstitutionalPage.xaml", UriKind.Relative);
        }

        private void BtnRegionClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Bölge Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/RegionPage.xaml", UriKind.Relative);
            btnRegion.IsChecked = false;
        }

        private void BtnBranchClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Şube Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/BranchPage.xaml", UriKind.Relative);
            btnBranch.IsChecked = false;
        }

        private void BtnPersonnelInfoClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Personel Bilgileri Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/PersonnelInfoPage.xaml", UriKind.Relative);
            btnPersonnelInfo.IsChecked = false;
        }

        private void BtnPersonnelActionClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - İzin, Ödül, Ceza, Personel Hareketleri Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/PersonnelActionPage.xaml", UriKind.Relative);
            btnPersonnelAction.IsChecked = false;
        }

        private void BtnIdCardInfoClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Nüfus Cüzdan Bilgileri Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/IdCardInfoPage.xaml", UriKind.Relative);
            btnIDCardInfo.IsChecked = false;
        }

        private void BtnInsuranceInfoClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Personel Referans-Özel Güvenlik-Mali Sorumluluk Sigorta Bilgileri Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/InsuranceInfoPage.xaml", UriKind.Relative);
            btnInsuranceInfo.IsChecked = false;
        }

        private void BtnCommunicationInfoClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Personel İletişim ve Acil Durum Bilgileri Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/CommunicationInfoPage.xaml", UriKind.Relative);
            btnCommunicationInfo.IsChecked = false;
        }

        private void BtnDressInfoClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Kıyafet Bilgi Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/DressInfoPage.xaml", UriKind.Relative);
            btnDressInfo.IsChecked = false;
        }

        private void BtnDinnerExpenseDetailClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Yemek Harcama Detay Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/DinnerExpenseDetailPage.xaml", UriKind.Relative);
            btnDinnerExpenseDetail.IsChecked = false;
        }

        private void BtnStudentInfoClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Öğrenci Kayıtlarının Alınması Sınav Bilgileri Ve Sertifika Bilgileri Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Operations/StudentInfoPage.xaml", UriKind.Relative);
            btnStudentInfo.IsChecked = false;
        }

        private void BtnPersonnelNomineesClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Personel Adayı İşe Başlatma Takip Ve Yer Değiştirme Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Personnel/PersonnelNomineePage.xaml", UriKind.Relative);
        }

        private void BtnPersonnelWorkOutsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Personel İşten Çıkış Bilgi Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Personnel/PersonnelWorkOutPage.xaml", UriKind.Relative);
            btnPersonnelWorkOuts.IsChecked = false;
        }

        private void BtnCustomerInfosClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Müşteri Bilgi Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/SalesAndCustomerRelations/CustomerInfoPage.xaml", UriKind.Relative);
        }

        private void BtnCustomerSalesInfosClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Müşteri Satış Bilgileri Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/SalesAndCustomerRelations/CustomerSalesInfoPage.xaml", UriKind.Relative);
            btnCustomerSalesInfos.IsChecked = false;
        }

        private void BtnCustomerSalesInfoReportsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Müşteri Satış Bilgileri Rapor Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/SalesAndCustomerRelations/Reports/CustomerSalesInfoReportPage.xaml", UriKind.Relative);
            btnCustomerSalesInfoReports.IsChecked = false;
        }

        private void BtnCustomerDigitalInfoReportsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Müşteri Sayısal Bilgi Raporu";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/SalesAndCustomerRelations/Reports/CustomerDigitalInfoReportPage.xaml", UriKind.Relative);
            btnCustomerDigitalInfoReports.IsChecked = false;
        }

        private void BtnCreateOffersClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Teklif Oluşturma Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/SalesAndCustomerRelations/CreateOfferPage.xaml", UriKind.Relative);
            btnCreateOffers.IsChecked = false;
        }

        private void BtnAdminInfoReportsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Yönetici Özet Bilgi Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Personnel/AdminInfoReportPage.xaml", UriKind.Relative);
            btnAdminInfoReports.IsChecked = false;
        }

        private void BtnInspectionInfosClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Vukuat Bilgi Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Inspection/InspectionInfoPage.xaml", UriKind.Relative);
        }

        private void BtnInstitutionInspectionsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Denetlenen Proje/Kurum Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Inspection/InstitutionInspectionPage.xaml", UriKind.Relative);
            btnInstitutionInspections.IsChecked = false;
        }

        private void BtnPersonnelInspectionsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Denetlenen Personel Bilgi Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/Inspection/PersonnelInspectionPage.xaml", UriKind.Relative);
            btnPersonnelInspections.IsChecked = false;
        }

        private void BtnCoursesClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Ders Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/EducationAndTraining/CoursePage.xaml", UriKind.Relative);
        }

        private void BtnRollCallsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Yoklama Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/EducationAndTraining/RollCallPage.xaml", UriKind.Relative);
            btnRollCalls.IsChecked = false;
        }

        private void BtnStudentRegistriesClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Öğrenci Kayıt Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/EducationAndTraining/StudentRegistryPage.xaml", UriKind.Relative);
            btnStudentRegistries.IsChecked = false;
        }

        private void BtnSuccessStatusesClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Başarı Durum Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/EducationAndTraining/SuccessStatusPage.xaml", UriKind.Relative);
            btnSuccessStatuses.IsChecked = false;
        }

        private void BtnTeacherRegistriesClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Eğitmen Kayıt Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/EducationAndTraining/TeacherRegistryPage.xaml", UriKind.Relative);
            btnTeacherRegistries.IsChecked = false;
        }

        private void BtnTimeTablesClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Ders Programları Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/EducationAndTraining/TimeTablePage.xaml", UriKind.Relative);
            btnTimeTables.IsChecked = false;
        }

        private void BtnUsersClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Kullanıcı Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/UserPage.xaml", UriKind.Relative);
        }

        private void BtnDocumentsClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Döküman Giriş Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/DocumentManagement/DocumentPage.xaml", UriKind.Relative);
        }

        private void BtnDocumentsApprovalClick(object sender, RoutedEventArgs e)
        {
            Title = _demoText + " - Döküman Onay Ekranı";
            var contentFrame = (Frame)ContentGrid.FindName("ContentFrame");
            if (contentFrame != null) contentFrame.Source = new Uri("/Project5188.Client;component/DocumentManagement/DocumentFlowPage.xaml", UriKind.Relative);
        }

        private void ContentFrameNavigated(object sender, System.Windows.Navigation.NavigationEventArgs e)
        {
            if (e.Uri != null && e.Uri.ToString().Contains("StartPage"))
            {
                Title = _demoText;
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("ParameterPage"))
            {
                Title = _demoText + " - Parametre Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("InstitutionalPage"))
            {
                Title = _demoText + " - Kurum Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("RegionPage"))
            {
                Title = _demoText + " - Bölge Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("BranchPage"))
            {
                Title = _demoText + " - Şube Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("PersonnelInfoPage"))
            {
                Title = _demoText + " - Personel Bilgileri Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("PersonnelActionPage"))
            {
                Title = _demoText + " - İzin, Ödül, Ceza, Personel Hareketleri Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("IdCardInfoPage"))
            {
                Title = _demoText + " - Nüfus Cüzdan Bilgileri Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("InsuranceInfoPage"))
            {
                Title = _demoText + " - Personel Referans-Özel Güvenlik-Mali Sorumluluk Sigorta Bilgileri Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("CommunicationInfoPage"))
            {
                Title = _demoText + " - Personel İletişim ve Acil Durum Bilgileri Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("DressInfoPage"))
            {
                Title = _demoText + " - Kıyafet Bilgi Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("DinnerExpenseDetailPage"))
            {
                Title = _demoText + " - Yemek Harcama Detay Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("StudentInfoPage"))
            {
                Title = _demoText + " - Öğrenci Kayıtlarının Alınması Sınav Bilgileri Ve Sertifika Bilgileri Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("PersonnelNomineePage"))
            {
                Title = _demoText + " - Personel Adayı İşe Başlatma Takip Ve Yer Değiştirme Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("PersonnelWorkOutPage"))
            {
                Title = _demoText + " - Personel İşten Çıkış Bilgi Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("CustomerInfoPage"))
            {
                Title = _demoText + " - Müşteri Bilgi Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("CustomerSalesInfoPage"))
            {
                Title = _demoText + " - Müşteri Satış Bilgileri Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("CustomerSalesInfoReportPage"))
            {
                Title = _demoText + " - Müşteri Satış Bilgileri Rapor Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("CustomerDigitalInfoReportPage"))
            {
                Title = _demoText + " - Müşteri Sayısal Bilgi Raporu";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("CreateOfferPage"))
            {
                Title = _demoText + " - Teklif Oluşturma Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("AdminInfoReportPage"))
            {
                Title = _demoText + " - Yönetici Özet Bilgi Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("InspectionInfoPage"))
            {
                Title = _demoText + " - Vukuat Bilgi Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("InstitutionInspectionPage"))
            {
                Title = _demoText + " - Denetlenen Proje/Kurum Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("PersonnelInspectionPage"))
            {
                Title = _demoText + " - Denetlenen Personel Bilgi Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("CoursePage"))
            {
                Title = _demoText + " - Ders Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("RollCallPage"))
            {
                Title = _demoText + " - Yoklama Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("StudentRegistryPage"))
            {
                Title = _demoText + " - Öğrenci Kayıt Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("SuccessStatusPage"))
            {
                Title = _demoText + " - Başarı Durum Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("TeacherRegistryPage"))
            {
                Title = _demoText + " - Eğitmen Kayıt Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("TimeTablePage"))
            {
                Title = _demoText + " - Ders Programları Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("UserPage"))
            {
                Title = _demoText + " - Kullanıcı Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("DocumentPage"))
            {
                Title = _demoText + " - Döküman Giriş Ekranı";
            }
            else if (e.Uri != null && e.Uri.ToString().Contains("DocumentFlowPage"))
            {
                Title = _demoText + " - Döküman Onay Ekranı";
            }
        }
    }
}
